﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using mjRegister.Entity;

namespace mjRegister
{
    public partial class MatchOrigin : Form
    {
        public int LineId { get; set; }
        public int MaxTeamNum { get; set; }

        public MatchOrigin()
        {
            InitializeComponent();
        }

        private void MatchOrigin_Load(object sender, EventArgs e)
        {
            Common.FillDropDownList(this.ddlLineId, typeof(MatchLine));

            if (this.ddlLineId.Items.Count > 0)
                this.ddlLineId.SelectedIndex = 0;

            if (this.ddlMaxTeamNum.Items.Count > 0)
                this.ddlMaxTeamNum.SelectedIndex = 0;
        }

        private void button1_Click(object sender, EventArgs e)
        {
           // LineId = (int)((MatchLine)this.ddlLineId.Text);
            LineId = 2; //临时解决 by sym
            MaxTeamNum = int.Parse(this.ddlMaxTeamNum.Text);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
